package com.jack.thinking.thread.core._2;

public class ExtendsLockReEnter {
	public static void main(String[] args) {
		Thread t = new Thread() {;
			@Override
			public void run() {
				new Sub().getInfo();
			}
		};
		t.start();
	}
}

class Main {
	synchronized public void getInfo() {
		System.out.println("parent's lock");
	}
}

class Sub extends Main {
	synchronized public void getInfo() {
		super.getInfo();
		System.out.println("sub's lock");
	}
}